home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / WINDOWS / CLIPST.ARJ / STDWIN.H < prev    next >
C/C++ Source or Header  |  1992-01-11  |  1KB  |  51 lines

  1. // stdwin.h
  2.  
  3. #if !defined(STDWIN_H)
  4. #define STDWIN_H
  5.  
  6. #include"winapp.h"
  7.  
  8. /* STDWIN
  9. A class derived from Window. This class creates a standard, overlapped Window
  10. with optional Scroll bars.
  11. */
  12. class WinAppStdWindow : public Window
  13.     {
  14. protected:
  15.     HMENU hMenu;        // main menu for this window
  16.     HMENU hPopUp;       // first popup for this menu
  17.     HANDLE hAccel;
  18. public:
  19.     WinAppStdWindow(char *name) :
  20.         Window(name)
  21.         {
  22.             // StdWindow class settings
  23.         AddClassStyle(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS);
  24.  
  25.             // Window settings: OVERLAPPEDWINDOW includes
  26.             // OVERLAPPED, CAPTION, SYSMENU, THICKFRAME,MINIMIZE_BOX,
  27.             // and MAXIMIZE_BOX
  28.         AddWinStyle(WS_BORDER | WS_OVERLAPPEDWINDOW | WS_VISIBLE);
  29.  
  30.         SetWinX(CW_USEDEFAULT);
  31.         SetWinY(CW_USEDEFAULT);
  32.         SetWinWidth(CW_USEDEFAULT);
  33.         SetWinHeight(CW_USEDEFAULT);
  34.         }
  35.  
  36.     static BOOL FAR PASCAL AboutDlg(HWND hDlg, unsigned message, 
  37.         WORD wParam, LONG lParam);
  38.  
  39.     void EnableScrolls(void)
  40.         {
  41.         AddWinStyle(WS_HSCROLL | WS_VSCROLL);
  42.         }
  43.     HMENU Menu(void)     {   return hMenu;   }
  44.     HMENU PopUp(void)    {   return hPopUp;  }
  45.     virtual ~WinAppStdWindow(){}
  46.     };
  47.  
  48. #endif
  49.  
  50.  
  51.